Release 10.1A: OpenEdge Development:
Progress 4GL Reference
RANDOM function
Returns a random integer between two integers (inclusive).
Note: This function returns a number from a pseudorandom sequence of numbers rather than a truly random sequence.The Alternate Random Number Generator (-rand) parameter determines whether the same sequence of random numbers is generated for each session. For information on this parameter, see OpenEdge Deployment: Startup Command and Parameter Reference .
Syntax
lowAn integer expression that is the lower of the two expressions you are supplying to the RANDOM function.
highAn integer expression that is the higher of the two expressions you are supplying to the RANDOM function.
ExampleOften when you set up a database for testing purposes, you want to generate many records without actually keying in data for each record. The
r-random.pprocedure generates 10 order records and a random number of order-lines for each order record.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |